/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.cx1.model.utils;

import org.apache.commons.lang.StringUtils;
import org.cx1.model.ContactType;

/**
 *
 * @author CX
 */
public class KContactTypes {
    
    public static final ContactType EMAIL = new ContactType(KContactTypeIDs.EMAIL, "Email", null, null);
    public static final ContactType LANDLINE = new ContactType(KContactTypeIDs.LANDLINE, "Landline", null, null);
    public static final ContactType MOBILE = new ContactType(KContactTypeIDs.MOBILE, "Mobile", null, null);
    public static final ContactType FAX = new ContactType(KContactTypeIDs.FAX, "Fax", null, null);
    
    //CX: TODO: temporary service
    public static ContactType getContactType(String id) {
        ContactType contactType = null;
        if (StringUtils.equals(id, KContactTypeIDs.EMAIL)) {
            contactType = EMAIL;
        }
        else if (StringUtils.equals(id, KContactTypeIDs.LANDLINE)) {
            contactType = LANDLINE;
        }
        else if (StringUtils.equals(id, KContactTypeIDs.MOBILE)) {
            contactType = MOBILE;
        }
        else if (StringUtils.equals(id, KContactTypeIDs.FAX)) {
            contactType = FAX;
        }
        return contactType;
    }
}
